-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] 인증 로직 구현 #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- ControllerAdvice가 ResponseEntity 타입으로 응답하도록 수정 - 서비스 관련 에러 코드 추가 - ErrorResponse 생성자 수정
- 엔티티 간 공통으로 활용 - Status Enum 추가
- BaseEntity 상속 받은 Member 엔티티 구현 - 회원가입 구현 - Role Enum으로 권한 정의
- SecurityConfig, EncoderConfig 구성
- ErrorResponse 타입으로 예외 응답
- 객체 필드 타입 검증 예외 Handler 추가
- 토큰 생성, 저장, Claims 추출, 만료 등의 작업 수행
- JWT 유효성 검증 필터
- 로그인 요청 시 호출되는 필터 - authenticationManager.authenticate()를 통해 내부적으로 인증 진행 - 인증 성공, 실패 처리 메소드 구현
- 로그아웃 요청 발생 시 catch 하여 토큰 만료 처리 진행
dohy-eon
approved these changes
Feb 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이정돈 프젝 할 때마다 하는 작업이라지만 진짜 작업속도가 빠른 편이긴 하시는군요... 👍
- 인증이 필요하지 않은 접근은 모두 허용해 불필요한 권한 검사를 피함
- 404, 500 등 에러 상황에 따라 ErrorResponse 타입으로 응답하도록 구현 - 에러 코드 추가
Closed
|
✨ 매핑 되지 않은 엔드포인트 404 예외 처리 수정 완료 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[feat] 인증 로직 구현
Issue
변경 내용
구현 사항
참고 사항
매핑되지 않은 엔드포인트에 대한 예외 처리 구현 필요 (404가 응답되어야 하는데 내부 구현에 따라 401이 응답 됨)